package com.link2room.rodimus.service;

import com.link2room.rodimus.entity.GroupBuyingTeamDetailEntity;
import com.link2room.rodimus.entity.GroupBuyingTeamEntity;
import com.link2room.rodimus.entity.MallOrderBase;

/**
 * Created by LN on 2017/12/6
 */
public interface IGroupBuyingService {
    String generateTeamNo() throws Exception;

    /**
     * 创建团
     * @param teamEntity
     * @param captainDetail
     */
    void saveTeam(MallOrderBase orderBase, GroupBuyingTeamEntity teamEntity, GroupBuyingTeamDetailEntity captainDetail) throws Exception;

    /**
     * 参团
     * @param orderBase
     * @param captainDetail
     * @throws Exception
     */
    void joinTeam(MallOrderBase orderBase, GroupBuyingTeamDetailEntity captainDetail) throws Exception;

    /**
     * 团队自动取消
     * @param orderBase
     */
    void teamAutoCancel(MallOrderBase orderBase) throws Exception;

    /**
     * 开团
     */
    void teamPaid(MallOrderBase orderBase) throws Exception;
}
